<template>
	<view>
		<button @click="onLog()">console.log</button>
		<button @click="onDebug()">console.Debug</button>
		<button @click="oninfo()">console.info</button>
		<button @click="onwarn()" type="warn">console.warn</button>
		<button @click="onError()" type="warn">console.Error</button>
	</view>
</template>

<script>
import { warn } from 'vue';

	export default {
		data() {
			return {
				title:'打印日志',
				name:'ljq',
				pwd:'1234'
			}
		},
		methods: {
			onLog(){
				// console.log("onLog()-->" + this.title);
				// //clog
				// console.log("clog");
				//clogv
				console.log('this.title:',this.title);
				console.log('this.title:'+this.title);
				console.log('this.title:',this.title,this.name,this.pwd);
				//
			},
			onwarn(){
				if(name==='ljq'){
					console.log("登录成功");
				}
				else{
					console.warn("信息有错");
				}
			},
			onError(){
				console.log("onError-->this is error message");
				try{
					//..
				}catch(e){
					console.error("catch"+e);
				}
			}
		}
	}
</script>

<style>
	button{
		margin: 30rpx;
	}
</style>
